
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>Overview of Chemical Properties &#8212; Texas A&amp;M Oil spill / Outfall Calculator 2.1.0 documentation</title>
    <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script src="../_static/jquery.js"></script>
    <script src="../_static/underscore.js"></script>
    <script src="../_static/doctools.js"></script>
    <script src="../_static/language_data.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Sources of Data in BioData.csv" href="bio_data.html" />
    <link rel="prev" title="ambient.convert_units" href="../autodoc/ambient/ambient.convert_units.html" />
   
  <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  <div class="section" id="overview-of-chemical-properties">
<h1>Overview of Chemical Properties<a class="headerlink" href="#overview-of-chemical-properties" title="Permalink to this headline">¶</a></h1>
<dl class="field-list simple">
<dt class="field-odd">Release</dt>
<dd class="field-odd"><p>2.1</p>
</dd>
<dt class="field-even">Date</dt>
<dd class="field-even"><p>Jun 05, 2020</p>
</dd>
</dl>
<span class="target" id="module-chemical_properties"></span><div class="section" id="chemical-properties-script">
<h2>Chemical Properties Script<a class="headerlink" href="#chemical-properties-script" title="Permalink to this headline">¶</a></h2>
<p>Create a dictionary of chemical properties</p>
<p>This script provides tools to create a dictionary of the properties of
several hydrocarbons and chemicals of environmental interest in a global
dictionary for use by other programs that need to know chemical properties.</p>
<div class="section" id="parameters">
<h3>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h3>
<p>The chemical data are stored in <code class="docutils literal notranslate"><span class="pre">./data/ChemData.csv</span></code> and the
biodegradation data are stored in <code class="docutils literal notranslate"><span class="pre">./data/BioData.csv</span></code>. In these files,
header rows are denoted by <code class="docutils literal notranslate"><span class="pre">%</span></code>, the last row of pure text is taken as the
variable names, and the last row with <code class="docutils literal notranslate"><span class="pre">()</span></code> is taken as the units. The
columns should include a key name (e.g., <cite>methane</cite>) followed by numerical
values for each parameter in the file.</p>
<p>For the data provided by the model, the data sources and more details are
documented in the documentation (see ./docs/index.html).</p>
</div>
<div class="section" id="notes">
<h3>Notes<a class="headerlink" href="#notes" title="Permalink to this headline">¶</a></h3>
<p>To use the properties database distributed by <code class="docutils literal notranslate"><span class="pre">TAMOC</span></code>, you must import this
module and then use the <cite>tamoc_data()</cite> method, which reads the databases
distributed with <code class="docutils literal notranslate"><span class="pre">TAMOC</span></code>.</p>
</div>
<div class="section" id="see-also">
<h3>See also<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h3>
<p><cite>dbm</cite> : Uses these dictionaries to create chemical mixture objects.</p>
</div>
<div class="section" id="examples">
<h3>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h3>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">tamoc</span> <span class="kn">import</span> <span class="n">chemical_properties</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">chem_db</span><span class="p">,</span> <span class="n">chem_units</span><span class="p">,</span> <span class="n">bio_db</span><span class="p">,</span> <span class="n">bio_units</span> <span class="o">=</span> <span class="n">chemical_properties</span><span class="o">.</span><span class="n">tamoc_data</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">chem_db</span><span class="p">[</span><span class="s1">&#39;oxygen&#39;</span><span class="p">][</span><span class="s1">&#39;M&#39;</span><span class="p">]</span>
<span class="go">0.031998800000000001</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">chem_units</span><span class="p">[</span><span class="s1">&#39;M&#39;</span><span class="p">]</span>
<span class="go">&#39;(kg/mol)&#39;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="module-functions">
<h2>Module Functions<a class="headerlink" href="#module-functions" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/chem/chemical_properties.load_data.html#chemical_properties.load_data" title="chemical_properties.load_data"><code class="xref py py-obj docutils literal notranslate"><span class="pre">load_data</span></code></a>(fname)</p></td>
<td><p>Load a chemical properties file into memory</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="input-data-documentation">
<h2>Input Data Documentation<a class="headerlink" href="#input-data-documentation" title="Permalink to this headline">¶</a></h2>
<p>This script provides tools to load the chemical and biological properties data. The main method that should be used is <code class="docutils literal notranslate"><span class="pre">tamoc_data()</span></code>.  For example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">tamoc</span> <span class="kn">import</span> <span class="n">chemical_properties</span>
<span class="n">chem_db</span><span class="p">,</span> <span class="n">chem_units</span><span class="p">,</span> <span class="n">bio_db</span><span class="p">,</span> <span class="n">bio_units</span> <span class="o">=</span> <span class="n">chemical_properties</span><span class="o">.</span><span class="n">tamoc_data</span><span class="p">()</span>
</pre></div>
</div>
<p>then, the chemical and biological data and units are stored in their
respective dictionaries.</p>
<p>The data loaded into these namespaces are stored in the files:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">data</span><span class="o">/</span><span class="n">ChemData</span><span class="o">.</span><span class="n">csv</span>
<span class="o">./</span><span class="n">data</span><span class="o">/</span><span class="n">BioData</span><span class="o">.</span><span class="n">csv</span>
</pre></div>
</div>
<p>The format for these data is described in</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="chem_data.html">Sources of Data in ChemData.csv</a></li>
<li class="toctree-l1"><a class="reference internal" href="bio_data.html">Sources of Data in BioData.csv</a></li>
</ul>
</div>
</div>
</div>


          </div>
          
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../index.html">Texas A&M Oil spill / Outfall Calculator</a></h1>








<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../user_manual.html">TAMOC User Manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="../unit_tests.html">Unit Tests</a></li>
<li class="toctree-l1"><a class="reference internal" href="../glossary.html">Glossary</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../bugs.html">Reporting Bugs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../readme.html">Read Me File</a></li>
<li class="toctree-l1"><a class="reference internal" href="../release.html">Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../license.html">License</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../index.html">Documentation overview</a><ul>
  <li><a href="../user_manual.html">TAMOC User Manual</a><ul>
      <li>Previous: <a href="../autodoc/ambient/ambient.convert_units.html" title="previous chapter">ambient.convert_units</a></li>
      <li>Next: <a href="bio_data.html" title="next chapter">Sources of Data in BioData.csv</a></li>
  </ul></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>








        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2020, Scott A. Socolofsky.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
      
      |
      <a href="../_sources/modules/chem.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>